package com.seaking.util;

/**
 * 网页分页管理系统
 * @author wchha
 *
 */
public class Page {

    private Integer pageSize = 12;
    private Integer pageCount;
    private Integer totalCount;
    private Integer pageNum = 1;
    private Integer limitCount;

    public Integer getLimitCount() {
        return  (pageNum - 1) * pageSize;
    }

    public void setLimitCount(Integer limitCount) {
        this.limitCount = limitCount;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pateNum) {
        this.pageNum = pateNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageCount() {
        return (int)Math.ceil(totalCount / (pageSize +0.0));
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }
}
